<template>
  <div>
    <el-form 
      :inline="true" 
      :model="formInline" 
      :rules="rules" 
      ref="formInline" 
      label-width="110px" 
      size="small"
      :disabled="isDisabled">
      <el-form-item label="资产名称:">
        <el-input v-model="formInline.username" clearable></el-input>
      </el-form-item>
      <el-form-item label="资产类目:" >
        <el-input v-model="formInline.realname" autocomplete="off" clearable></el-input>
      </el-form-item>
      <el-form-item label="资产状态:">
        <el-input type="password" v-model="formInline.password" autocomplete="off" clearable></el-input>
      </el-form-item>
      <el-form-item label="资产来源:">
        <el-input type="password" v-model="formInline.checkPass" autocomplete="off" clearable></el-input>
      </el-form-item>
      <el-form-item label="单位:" prop="age">
        <el-input v-model.number="formInline.phone" clearable></el-input>
      </el-form-item>
      <el-form-item label="资产SN号:" prop="age">
        <el-input v-model.number="formInline.age" clearable></el-input>
      </el-form-item>
      <el-form-item label="资产Mac地址:" prop="age">
        <el-input v-model.number="formInline.age" clearable></el-input>
      </el-form-item>
      <el-form-item label="密级:" prop="age">
        <el-input v-model.number="formInline.age" clearable></el-input>
      </el-form-item>
      <el-form-item label="用途:" prop="age">
        <el-input v-model.number="formInline.age" clearable></el-input>
      </el-form-item>
      <el-form-item label="品牌:" prop="age">
        <el-input v-model.number="formInline.age" clearable></el-input>
      </el-form-item>
      <el-form-item label="规格:" prop="age">
        <el-input v-model.number="formInline.age" clearable></el-input>
      </el-form-item>
      <el-form-item label="型号:" prop="age">
        <el-input v-model.number="formInline.age" clearable></el-input>
      </el-form-item>
      <el-form-item label="放置位置:" prop="age">
        <el-input v-model.number="formInline.age" clearable></el-input>
      </el-form-item>
      <el-form-item label="IP地址:" prop="age">
        <el-input v-model.number="formInline.age" clearable></el-input>
      </el-form-item>
      <el-form-item label="硬盘ID:" prop="age">
        <el-input v-model.number="formInline.age" clearable></el-input>
      </el-form-item>
      <el-form-item label="硬盘MAC地址:" prop="age">
        <el-input v-model.number="formInline.age" clearable></el-input>
      </el-form-item>
      <el-form-item label="端口号:" prop="age">
        <el-input v-model.number="formInline.age" clearable></el-input>
      </el-form-item>
      <el-form-item label="购入日期:" prop="age">
        <el-input v-model.number="formInline.age" clearable></el-input>
      </el-form-item>
      <el-form-item label="购入人:" prop="age">
        <el-input v-model.number="formInline.age" clearable></el-input>
      </el-form-item>
      <el-form-item label="保修时间:" prop="age">
        <el-input v-model.number="formInline.age" clearable></el-input>
      </el-form-item>
      <el-form-item label="使用寿命:" prop="age">
        <el-input v-model.number="formInline.age" clearable></el-input>
      </el-form-item>
      <el-form-item label="登记人:" prop="age">
        <el-input v-model.number="formInline.age" clearable></el-input>
      </el-form-item>
      <el-form-item label="使用位置:" prop="age">
        <el-input v-model.number="formInline.age" clearable></el-input>
      </el-form-item>
      <el-form-item label="保管人:" prop="age">
        <el-input v-model.number="formInline.age" clearable></el-input>
      </el-form-item>
      <el-form-item label="使用人:" prop="age">
        <el-input v-model.number="formInline.age" clearable></el-input>
      </el-form-item>
      <el-form-item label="安装日期:" prop="age">
        <el-input v-model.number="formInline.age" clearable></el-input>
      </el-form-item>
      <el-form-item label="工程商:" prop="age">
        <el-input v-model.number="formInline.age" clearable></el-input>
      </el-form-item>
      <el-form-item label="维保商:" prop="age">
        <el-input v-model.number="formInline.age" clearable></el-input>
      </el-form-item>
      <el-form-item label="维保人:" prop="age">
        <el-input v-model.number="formInline.age" clearable></el-input>
      </el-form-item>
      <el-form-item label="维保人手机号:" prop="age">
        <el-input v-model.number="formInline.age" clearable></el-input>
      </el-form-item>

      <el-form-item label="备注:" prop="age">
        <el-input
          type="textarea"
          autosize
          placeholder="请输入内容"
          v-model="formInline.age">
        </el-input>
      </el-form-item>
    </el-form>
    <div class="footer">
      <el-button type="primary" size="mini" v-show="isDisabled" @click="setDisabled(false)">编 辑</el-button>
      <el-button size="small" v-show="!isDisabled" @click="setDisabled(true)">取 消</el-button>
      <el-button type="primary" size="small" v-show="!isDisabled" @click="setDisabled(true)">保 存</el-button>
    </div>
  </div>
  
</template>

<script>
export default {
  data() {
    return {
      isDisabled: true,
      formInline: {
        pass: '',
        checkPass: '',
        age: '',
        deptIdList: []
      },
    }
  },
  methods: {
    setDisabled(status) {
      this.isDisabled = status
    }
  }
  
}
</script>

<style lang="scss" scoped>
.footer {
  float: right;
  padding-right: 100px;
  padding-top: 50px;
}
</style>
